package com.wh.advice.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Test2Controller {
    @RequestMapping("/t1")
    public boolean t2() {
        int a = 10 / 0; //抛出ArithmeticException
        return true;
    }

    @RequestMapping("/t2")
    public Integer t3() {
        String a = null;
        System.out.println(a.length()); //抛出NullPointerException
        return 200;
    }
}
